A project in IntelliJ IDEA is composed from a set of roots (directories and files), describing locations of various project elements such as source files, working directories, classpath archives and directories, compiler output directory, JavaDoc locations, etc.
Project roots are specified when creating a new project with the New Project Wizard or on the "Paths" page of the Project Properties dialog.
Every project is stored in an XML file having extension ".IPR".
| Category | Description |
|---|---|
| Project paths |
Project paths define a set of directories containing files you intend to work with. For example, these directories and files will be shown in "Project" mode of the Commander and in Project View in CodeEditor, so you will be able to open and edit them. Also, when performing different operations such as compiling, class renaming or usage search, they will be performed in these files only. |
| Source paths |
Source paths are used for specifying directories containing .java files,
corresponding to default (unnamed) java packages.
They are used (as well as Class paths) mainly for source location and reference resolving purposes. In other words,
if there is a reference in your code to some class, the IDE (just like a compiler does) has to find a real class it is
referencing, in order to correctly handle various operations such as usage search, element renaming, moving or
any other code analysis and modifications. |
| Class paths |
Class paths are used for specifying directories and archive (jar/zip) files containing compiled java classes (.class files).
They are used (as well as Source paths) mainly for reference resolving purposes. In other words, if there is a reference
in your code to some class, the IDE (just like a compiler does) has to find a real class it is referencing,
in order to correctly handle various operations such as usage search, element renaming, moving or any other code analysis
and modifications. Also, the Class paths are automatically passed to the compiler (-classpath option). |